import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MyPageView(),
    );
  }
}

class MyPageView extends StatelessWidget {
  final PageController controller = PageController(viewportFraction: 0.5);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('同时显示多个页面'),
      ),
      body: PageView.builder(
        controller: controller,
        itemCount: 10, // 你的页面数量
        itemBuilder: (context, index) {
          return Center(
            child: Container(
              margin: const EdgeInsets.all(10.0),
              color: Colors.blue,
              child: Center(
                child: Text(
                  'Page $index',
                  style: TextStyle(fontSize: 24, color: Colors.white),
                ),
              ),
            ),
          );
        },
      ),
    );
  }
}
